home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / portable / clearok.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.2 KB  |  50 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    clearok
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_clearok = "$Header: C:\CURSES\portable\RCS\clearok.c 2.1 1993/06/18 20:19:42 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   clearok()    - enable screen clearing
  15.  
  16.   X/Open Description:
  17.      If bf is TRUE, the next call to wrefresh() with this window will
  18.      clear the screen completely and redraw the entire screen.
  19.  
  20.   X/Open Return Value:
  21.      The clearok() function returns OK on success and ERR on error.
  22.  
  23.   X/Open Errors:
  24.      No errors are defined for this function.
  25.  
  26.   PDCurses Errors:
  27.      It is an error to call this function with a NULL window pointer.
  28.  
  29.   Portability:
  30.      PDCurses    int clearok( WINDOW* win, bool flag );
  31.      X/Open Dec '88    int clearok( WINDOW* win, bool bf );
  32.      BSD Curses
  33.      SYS V Curses    int clearok( WINDOW* win, bool bf );
  34.  
  35. **man-end**********************************************************************/
  36.  
  37. int    clearok(WINDOW *win, bool flag)
  38. {
  39. #ifdef PDCDEBUG
  40.     if (trace_on) PDC_debug("clearok() - called\n");
  41. #endif
  42.  
  43.     if (win == (WINDOW *)NULL)
  44.         return( ERR );
  45.  
  46.     win->_clear = flag;
  47.  
  48.     return( OK );
  49. }
  50.